<template>
  <div id="userLayout" :class="['user-layout-wrapper', device]">
    <div class="container">
      <div class="desaysvLoginbg" style="height:100%">
        <div style="minHeight:calc(100% - 72px)">
          <div class="box">
<!--          <div class="testWarp">-->
<!--            <div class="top">-->
<!--              <div class="header">-->
<!--                <img src="~@assets/userLayout.png" class="logo,des" alt="logo" width="235"/>-->
<!--              </div>-->
<!--              <div class="desc">{{ $t('OTAsystem') }}</div>-->
<!--            </div>-->
<!--          </div>-->
          <route-view></route-view>
          </div>
        </div>
        <global-footer colorSty="userlayoutCopyright" class="loginPageFooter" />
      </div>
    </div>
  </div>
</template>

<script>
import RouteView from './RouteView'
import { mixinDevice } from '@/utils/mixin'
import GlobalFooter from '@/components/GlobalFooter'

export default {
  name: 'UserLayout',
  components: { RouteView, GlobalFooter },
  mixins: [mixinDevice],
  data () {
    return {
      loginbg: 'loginbg',
      desc: ''
    }
  },
  mounted () {
    document.body.classList.add('userLayout')
  },
  beforeDestroy () {
    document.body.classList.remove('userLayout')
  }
}
</script>

<style lang="less" scoped>
#userLayout.user-layout-wrapper {
  height: 100%;
  &.mobile {
    .container {
      .main {
        max-width: 368px;
        width: 98%;
      }
    }
  }

  .container {
    width: 100%;
    height: 100%;
    position: relative;
    .desaysvLoginbg {
      background: url(../../assets/welcomebg.png) center center no-repeat;
      background-size: cover;
    }
    .box {
      min-width: 940px;
      min-height: 460px;
      height: calc(100vh - 80px);
      border-radius: 20px;
      padding: 100px 20%;
    }
  }
}
</style>
<style lang="less">
#userLayout {
  .loginPageFooter {
    border: none;
  }
}
</style>
